home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
graphics
/
dmjgif3.lzh
/
DMJ_GIFþ.MAN
< prev
next >
Wrap
Text File
|
1991-11-04
|
68KB
|
1,545 lines
//////////////////////////////////////////////////////
/////////// // /// //// ///// // / ///////
////////// / / / //// //// ///// / ///////////
///////// / / //// //// / / / //////////
//////// / / / / / //// // / / /////////////
/////// // / // ////// // / //////////////
//////////////////////////////////////////////////////
Version 3.0
by Damien M. Jones
October 31, 1991
DMJ GIF Program and Manual Copyright © 1991 Damien M. Jones.
All Rights Reserved.
Page 2
Copyright Notice
DMJ GIF, its companion utilities, and this manual are all
Copyright 1991 Damien M. Jones, All Rights Reserved. You may
copy unregistered versions of the program as you wish as long
as all of the files listed in the file READTHIS.1ST are
included. You may not charge for these copies, except
reasonable charges to cover the acquisition of the program
and the media it is distributed on (as in Public
Domain/Shareware distributors). This charge should not
exceed $10. Registered copies of DMJ GIF should not be
copied except for your own personal use. The rule of thumb
here is multiple copies on one computer, or one copy on
multiple computers (although not simultaneously). You may
sell your registered copy of DMJ GIF, but your printed manual
must accompany the sale, and new owners should send their
program disk back to register the change of ownership, or
they will not receive updates.
Shareware Notice
This program is Shareware. If you like it and use it, please
send $15 to the address on the front cover. In return for
registering this program, you will receive a printed manual
and the latest registered version of DMJ GIF. Registered
versions of DMJ GIF are almost twice as fast as unregistered
versions, and are not to be distributed. You'll also receive
free updates to the program as they become available.
About this Manual
If you've used DMJ GIF before, you'll notice that this is a
new manual. You should be able to skip the introduction, but
be sure to read the rest of the manual before trying to use
DMJ GIF. It's a completely different program now; you'll be
in for a surprise or two.
This text for this manual was created with ST Writer Elite
4.2.
About the Programs
The programs DMJ GIF, SPC2PI1, SPC2PI3, SPU2SPC, and SPC-3375
were all written in GFA BASIC 3.07, with portions written in
assembly. The code is entirely mine, except for the Spectrum
display and decompression routines. Thanks to Trio for
writing those two and releasing them to the public.
Page 3
Table of Contents
Introduction . . . . . . . . . 4
Running DMJ GIF . . . . . . . 5
The Main Dialog . . . . . . . . 5
Converting a GIF . . . . . . . 6
The Custom Fileselector . . . . . . 8
Batch Conversions . . . . . . . 11
ST Resolution GIFs . . . . . . . 13
Conversion Types . . . . . . . 13
Dithering . . . . . . . . . 14
Palettes . . . . . . . . . 14
Scaling . . . . . . . . . . 15
Mapping . . . . . . . . . 16
Interlaced GIFs . . . . . . . . 18
Keyboard Shortcuts . . . . . . . 18
Preferences . . . . . . . . . 19
Bugs . . . . . . . . . . 20
Feedback . . . . . . . . . . 21
The Companion Utilities . . . . . 21
Thanks... . . . . . . . . . 23
Page 4
Introduction
Great. You've managed to get your hands on DMJ GIF,
undoubtedly the best non-commercial GIF to Spectrum converter
available. This program also allows you to convert entire
batches of GIF's at once, without your supervision. It
allows you to convert to Spectrum, DEGAS, or Tiny, in color,
grey scale, or monochrome, using either the ST's regular
palette or the STe's enhanced palette, converting ANY size
GIF--and it runs in only a half meg.
If you don't know what a GIF file is, well, it's a picture
format developed by CompuServe as a sort of standard. Since
many different computers can create and use pictures in this
format, and because of the efficient compression used to save
space, this is an ideal format for exchanging pictures via
bulletin board systems. It doesn't matter what kind of
computer the picture was created on, because the GIF standard
doesn't care. Neither does your ST. Well, not too much,
that is.
The ST has three different graphics resolutions it can use.
There is low resolution, which is 320x200x16; there's medium
resolution, which is 640x200x4; and there is high resolution,
which is 640x400 in monochrome. The problem arises in that
most GIF pictures don't fit nicely into one of the ST's
resolutions. A lot of them are 640x350x16, or 320x200x32, or
640x480x256. And while the ST has 512 colors it can choose
from (the palette size), most GIF pictures use a much larger
palette--allowing them much greater detail in colors.
A few years ago, some very, very clever programmers devised a
way to put all 512 of the ST's colors on the screen at one
time. So they effectively added a fourth graphics resolution
to the ST: Spectrum mode, or 320x200x512. Although the pixel
resolution is the same as low resolution, and the palette
size is still only 512 colors, these colors can be mixed, or
"dithered", to make it look like there are a lot more on the
screen. This wouldn't be possible unless there were fewer
restrictions on using colors; 16 colors just isn't enough to
do the dithering that DMJ GIF does.
DMJ GIF is not the first program that converts GIF pictures
to Spectrum pictures. But this program excels in its
handling of pictures that are larger than the ST's low
resolution of 320x200. Here's why: most programs (or should
I say, every single program I've ever used except the
Spectrum paint program itself) don't scale things very well.
Let's say, for example, that you want to convert a picture
that's 640x400x16 colors down to a picture that's
320x200x512. What you'd do is divide the entire screen up
into little squares--each square being 2x2 pixels. Most
programs look at each little square and pick one of the
points, assuming it best represents the entire square.
Page 5
That's usually no problem, but if you've got a lot of
patterns and "dithering", then you DO have a problem, because
you're leaving out 75% of the detail while preserving the
other 25%. What you end up with is usually a mess.
This program takes a different approach. Instead of just
picking one pixel from that 2x2 square, it determines the
overall color by averaging the colors of the pixels. (That's
why you need 512 colors--when you start averaging 16 colors
with different amounts of each one, the number of colors gets
big, fast.) Of course, with fantastic results there comes a
price. The price with this program is speed. Because of the
averaging and the floating point (read "slow") arithmetic,
this program takes a while to run. But the results are WELL
worth the wait. And registered versions of DMJ GIF are much
faster.
Running DMJ GIF
To run DMJ GIF, all you have to do is double-click on
DMJ_GIF.TOS from the Desktop in medium resolution. You'll
need at least 340K free; if you have only 512K I'd strongly
suggest stripping out all your accessories and AUTO folder
programs, since the more memory DMJ GIF has, the better it
works. And even when you do this, you won't be able to
convert a GIF directly to DEGAS/Tiny format in full color
with only 512K, since this direct conversion uses a 96K
buffer...
Once you have the program loaded, you'll see a small dialog
telling you this program is an unregistered version of the
program. If you get a dialog thanking you for registering
the program, and you haven't, then you have a pirate copy of
the registered version. Please destroy it immediately!
The Main Dialog
The first rule of thumb when using DMJ GIF is not to freak
when you see the main dialog. There's a lot of things there;
DMJ GIF is a powerful program, and there's no easy way of
putting all of that power at your fingertips and yet making a
program easy to use. Fortunately, however, help is always at
your fingertips--just press the HELP key on your ST's
keyboard, and you'll receive complete help without ever
leaving the program. (You will need the file DMJ_GIF3.HLP in
the same folder as DMJ GIF, however; see above.)
The dialog is divided into five main sections. These are
"Stuff", "Files", "Control", "Options", and "Info". In the
"Stuff" section you will find three buttons, "Help", "Info",
and "Quit". "Help" will allow you to enter the help system;
it has the same effect as pressing the HELP key. "Info"
Page 6
brings up some information about the program, such as
version, date, and who the program is registered to. "Quit"
is used to exit the program; you will be asked if you are
sure.
In the "Files" box you will see space for two filenames. One
is "From", which is the source file, and the other is "To",
which is the destination file.
In the "Control" box are the buttons that tell DMJ GIF what
you want done. The buttons here are "Begin", "Add",
"Remove", "Save", and "View". You'll also see a space
labeled "Pictures"; this tells you how many pictures DMJ GIF
has stored in its batch list. Beneath that you will see a
slider, which lets you move to any picture in the list.
In the "Options" box are all the settings on how to convert a
GIF. You'll find five "Dither" buttons, four "Palette"
buttons, and also "Map", "Guess", "Exact", "Type", "Skip",
and "Prefs".
In the "Info" box you'll see blanks for "Image Size",
"Palette Size", and "Colors". You'll also see a button
labeled "More", which brings up a lot more information about
the current picture.
Converting a GIF
Despite appearances (that main dialog can be quite
intimidating) converting a GIF is not actually that
difficult. To begin with, you need to tell DMJ GIF just what
file you want to convert. So grab the mouse and click on the
"From" filename in the upper right hand corner of the dialog.
A file selector will appear, allowing you to choose a GIF
file. (If you have trouble with the custom file selector,
you can either press HELP, or read the section below on the
custom file selector.) Just choose the GIF picture you want
to convert, and then click on "Okay". You'll then see a
small status display in the center of the screen, tell you it
is "Analyzing" a file. This just means DMJ GIF is looking at
the GIF to find out how it should convert it. For most
pictures this is reasonably fast; for 256-color VGA pictures
it takes about eight seconds.
That step completed, you will find several things have
happened: first, the "To" file has been changed to almost the
same as the "From"--the only difference being the last three
letters. This is called the extension. For a GIF picture,
the extension is "GIF"; for a Spectrum picture, it's "SPC" or
"SPU". "SPC" is compressed form, which saves disk space.
"SPU" is uncompressed form.
Another change is that the blanks in the "Info" area have
Page 7
suddenly been filled. Don't worry about that now; that
information just describes the GIF picture you've selected.
The last change is that one of the "Dither" buttons in the
"Options" section has been selected, as has one of the
"Current Palette" buttons. Don't worry about that yet
either.
All you have to do now is select the "Begin" button in the
"Control" section of the dialog. DMJ GIF will begin
converting the picture from GIF format to Spectrum format.
This can take some time, so don't panic when it isn't
finished in the blink of an eye. When the entire conversion
is done, DMJ GIF will save the picture to the disk.
While DMJ GIF is busy, you'll see a small status display in
the middle of the screen. It will tell you what DMJ GIF is
doing, and approximately how much of that task it has already
completed. "Analyzing" refers to two things: first, when a
GIF is first read, its palette must be analyzed to determine
the proper amount of dithering. Second, it refers to
analyzing the colors of a converted picture to determine
which colors to use. "Reading" refers to the simple task of
loading the picture from the disk. "Uncompressing" refers to
the task of uncompressing a picture. For most GIFs this is
done during "Scaling", but interlaced GIFs must be
uncompressed first; Mapped pictures must also be partially
uncompressed. ST format pictures (Spectrum, Tiny, and DEGAS
Elite) must also be uncompressed before being viewed.
"Scaling" refers to the time-consuming process of reducing
and averaging the picture to the proper size. "Plotting"
refers to the actual process of plotting the picture; this is
usually done at the same time as "Scaling". "Compressing"
refers to the task of compressing the picture prior to saving
it, and "Writing" refers to the actual saving to disk of the
picture. Note that not all of these steps need appear for
any single picture; usually all you'll see during the actual
conversion are "Reading", "Scaling", "Compressing", and
"Writing".
You can abort the conversion at any time by pressing any key;
a small dialog will appear, giving you three choices. The
first one, "Abort", will end the conversion and return you to
the main dialog. The second option, "Peek", will allow you
to look at the picture--at least, as much of it as has been
converted. Press any key to return to the conversion. The
last option, "Cancel", will simply return you to the
conversion. (If the "Peek" option does not appear, that's
because the picture is not yet in ST displayable form. You
can "Peek" at any picture while it is in the "Scaling" phase,
except Full Color conversions to Low Resolution
(non-Spectrum), in which case you must wait for the
"Plotting" phase.)
Page 8
See? That wasn't so hard. All of those other
options--reduction factors, dithering, and filename--are
automatically selected by DMJ GIF. Most of the time you
won't have to worry about any of them. About the only one
you might want to change is the "Destination" file. All you
have to do to change that is to click on it, and a file
selector will appear, allowing you to choose the name for the
destination file. Remember that this should end in either
".SPC" (for a compressed picture) or ".SPU" (for an
uncompressed picture). If it doesn't, DMJ GIF will restore
the extension you previously had. (If you're not converting
to a Spectrum picture, then you won't be using ".SPC" or
".SPU" as the extension. See "Conversion Types" for more
information.)
The Custom Fileselector
DMJ GIF uses a custom file selector. It's really quite
simple to use. If you have an alternate file selector loaded
(like the Universal Item Selector, or the Little Green
Selector) you won't be able to use it.
At the top of the file selector is a line of text telling you
what file you're supposed to be selecting with the file
selector. By "grabbing" this bar with the mouse (i.e. move
the pointer to it, press, and hold the left button down) you
can drag the entire file selector to a new spot on the
screen. The file selector will appear at this same spot
every time you use it, until you leave the program.
Below this line, you will see a line of text containing the
pathname. You cannot change this line directly. More on
this later.
Below the pathname is the major component of the file
selector: the filenames. This large white box contains up to
24 filenames at a time. To select a filename, just click on
it. Then click on the "Okay" button, which you will find in
the lower right hand corner of the file selector. You can
also just double-click on the filename and skip clicking on
the "Okay" button; it will do the same thing.
Below the white filename box you will see the name of the
currently selected file. This filename can be edited with
the keyboard. You can use the left and right arrow keys,
BACKSPACE, and DELETE to edit this filename. You will not be
able to enter an illegal filename. You can press ESC to
erase the filename completely; CTRL and the left or right
arrow key will move the cursor to the beginning and end of
the filename, respectively.
In the lower right hand corner of the file selector you will
find two buttons, "Okay" and "Cancel". Selecting "Okay"
Page 9
confirms the choice listed in the "Filename" area in the
lower left hand corner of the file selector. Selecting
"Cancel" aborts this selection process. Pressing RETURN on
the keyboard is the same as selecting "Okay"; pressing UNDO
is the same as selecting "Cancel".
Directly to the right of the white filename box is a vertical
slider. This is only useful when there are more than 24
files in the current folder. You can use the up and down
arrow buttons to scroll the names; you can click above or
below the slider itself to move the slider in that direction
quickly; or you can drag the slider to a new position
directly.
You may have noticed some of the files in the white filename
box have a small > symbol to their left. These aren't files;
they are folders. You can click on a folder's name (just
once) to change the current folder and see what's inside it.
The pathname line directly above the white filename box will
reflect the change--the new folder name will be added on the
end. To exit back out of the folder, you can either select
the "<-" button in the upper right hand corner of the file
selector, or click on the part of the pathname that you want
to go to. For example, if your current folder is
"D:\PICTURES\GIF\" and you wanted to go back to the PICTURES
folder, you could either select the "<-" button, or click on
the word "PICTURES" in the pathname line. You can jump back
several folders at a time with just one click. In the
example above, you could click on "D:\" and go to the main
directory of the disk, whereas it would take two clicks of
the "<-" button to do the same.
There are three other buttons in the upper right hand corner
of the file selector. One has a drive letter on it; another
has a disk icon on it; the third has "*.*" on it. The drive
letter button allows you to quickly change the current drive.
Just click and hold the mouse button down on the drive
letter. Move the mouse pointer to the drive you want to use,
and release the mouse button. You will not be able to select
a drive that does not exist--this also means drive B:, so if
you have a single floppy drive, forget about drive B:.
The disk icon button serves no other purpose but to tell the
file selector that you have inserted another disk, and you
would like to reread the disk's directory.
The "*.*" icon, however, will require some explanation. This
button calls up another dialog that allows you to select the
"search mask". The search mask is how you tell the file
selector which files you want to see in the white filename
box. You shouldn't normally need to use this. Before
explaining about the search mask dialog, a little explanation
about search masks themselves is necessary. Search masks are
just filenames with wildcards in them. There are two
Page 10
wildcard characters that are used: the asterisk (*) and the
question mark (?). The question mark represents any
letter--but only one letter. The asterisk represents any
number of letters. Here's some examples to make things
clearer: the wildcard PIC?.SPC would match PIC1.SPC,
PIC2.SPC, and PICZ.SPC, but not PIX1.SPC, PIC.SPC, or
PIC23.SPC. The wildcard PIC*.SPC would match PIC1.SPC,
PIC2.SPC, PICZ.SPC, PIC.SPC, PIC23.SPC, and PICTURE.SPC, but
not PIX1.SPC or PIXELS.SPC. See? That's why the wildcard
"*.*" is used to mean all files--because it matches all
filenames. Any number of characters, of any type, match the
first *. Then there's the period, which separates the name
from the extension. The last * matches any extension, no
matter how long it is. The catch here is that GEMDOS takes a
shortcut when it comes to "*.*". That wildcard shouldn't
match the filename "TEST", because it doesn't have a period
in it. But because GEM doesn't actually record the period on
the disk, it assumes it is there. So when GEMDOS checks for
files, "TEST" comes out to be "TEST.", and so fits the
wildcard.
You've undoubtedly used wildcards before. In the GEM File
Selector, the wildcard appears at the end of the pathname.
Many programs make use of wildcards to mask out files you
don't need to worry about. For example, when selecting a
picture from SPC-3375, it uses a search mask of *.SP?. This
allows all files to appear in the GEM File Selector, as long
as the first two letters of the extension are "SP". So
anything with an extension of "SPC" and "SPU" will show up.
Unfortunately, anything with an extension of "SPX" or "SPQ"
will also show up. It would be nice if there was an easy way
to allow only the extensions "SPC" and "SPU".
The DMJ GIF file selector allows you to do just that. It
allows you to take several wildcards and chain them together
to make one mask; a file only needs to fill one of the
wildcards to appear in the white filename box. You separate
wildcards with the vertical bar character, |. So to display
just Spectrum pictures, you'd use the mask "*.SPC|*.SPU",
instead of the less precise "*.SP?".
Now that the enhanced wildcards have been explained, I can
explain how to use the "*.*" dialog. You will see ten lines
in the dialog, each with a different search mask. To select
one of these search masks, just select its button, which can
be found at the left side of the dialog. You can select "Ok"
to confirm your choice, or double-click on your choice to
avoid the "Ok" button. You can press F1-F10 in place of
click on the selection buttons, and you can press RETURN in
place of clicking on the "Ok" button. If you want to change
one of the search masks, click on the mask you want to
change. Then use the arrow keys, BACKSPACE, and DELETE to
edit the search mask on that line. Remember that simply
editing a mask does not select it; you must choose its button
Page 11
on the left hand side. Also note that you cannot edit the
top two lines. These are reserved. The top line has the
mask provided when the fileselector was called up; the second
line has the catch-all "*.*".
This file selector is new and different, yes. But once you
learn how to use it (and it won't take very long at all) you
won't even notice it. You'll find this selector appearing in
more dmj software programs in the future, so you won't have
to learn a new file selector for my other programs.
Batch Conversions
DMJ GIF does not have a separate "batch" mode; every time you
convert a single picture, you are actually converting a batch
of pictures, even though it is only one picture. If you want
to convert a group of pictures, there are two ways to do it.
One way is to select a wildcard for the "From" file, like
"*.*"; this will read every GIF in the selected folder.
Another way is to use the "Add" button; you can then add
single files or more wildcards, even in separate folders and
separate drives. DMJ GIF keeps its picture list in
alphabetical order, including the entire pathname. So
pictures on drive A are sorted before pictures on drive C.
Once you have more than one picture in the list, you'll see
the slider in the "Control" box change. You can click on the
arrows next to the slider to move forward and backward
through the list, or you can drag the slider to a new
location. Each picture has its own dither, palette, and
scaling settings, and its own destination file.
If you click on the "To" filename and change the folder to
save the picture in, an alert box will pop up asking you if
you want to change the folders of the other pictures. "All"
will change the folders of all the pictures to the same as
the one you just selected; "Match" will change only those
pictures that have the same path as the current picture
before it was changed. "None" will change the path of none
of the other pictures.
Perhaps an example will make this clearer. Let's say you
have three pictures, BEARS.GIF, COBRA.GIF, and EAGLE.GIF, in
the folder ANIMALS. You also have the pictures MAC2RAY.GIF
and MUSEUM.GIF in the folder RAYTRACE. The default "To" name
for each of these pictures will be in the same folder as the
picture--ANIMALS\BEARS.GIF will be saved as
ANIMALS\BEARS.SPC, and RAYTRACE\MAC2RAY.GIF will be saved as
RAYTRACE\MAC2RAY.SPC. Let's say you want to save all of the
ANIMALS pictures in another folder called NEWSTUFF. To do
that, click on the "To" name for one of the animals pictures,
say, BEARS.GIF. Move to the folder NEWSTUFF instead of
ANIMALS; then click on "Okay". Now the "To" name is
Page 12
NEWSTUFF\BEARS.SPC. The alert box will appear, asking you if
you want to change "All", "Match", or "None". Select
"Match", and all the other ANIMALS pictures will be changed
to the NEWSTUFF folder. Simple, huh? If you'd chosen "All",
then all of the pictures (including the RAYTRACE ones) would
be saved in the NEWSTUFF folder. "None" would save only
BEARS.SPC in the NEWSTUFF folder, since you had already
changed that one.
Besides "Begin" and "Add", you'll see three other buttons in
the "Control" section of the dialog. These are "Remove",
"Save", and "View". "View" brings up a dialog, asking if you
want to view a single picture or the entire batch list. If
you select "Single" then a fileselector will appear, allowing
you to choose a single picture to view. Press any key to
return to the fileselector; select "Cancel" from the
fileselector to end viewing single pictures. If you choose
to view the entire batch list, DMJ GIF will try to show you
the destination pictures in its batch list. That way, if
you've just converted several pictures, you can quickly view
them all. While viewing the pictures, use the left and right
arrow keys to set the direction (backwards or forwards,
respectively), Backspace to back up one picture, ESC or Undo
to end the slideshow, or any other key to advance to the next
picture. There is no time delay, so pictures will not
advance until you decide to. If you attempt to view an STe
picture while using an ST, DMJ GIF will "flicker" the colors
to simulate 3,375 of the STe's 4096 colors. The "Remove"
button simply removes all of the skipped pictures from the
list. That way you don't even have to have them in your
list. And the "Save" button saves the list as a script file.
These script files should have an extension of .DGS (DMJ GIF
Script). To load these script files back in, just click on
the "From" filename; you'll see the .DGS files appear in the
fileselector. Just select one.
In the "Options" section there is a button labeled "Skip".
"Skip" is a button that can be set for any of the pictures
you have in the list; if it is set, DMJ GIF will not convert
that picture, but will skip it. This is useful if you have a
whole bunch of new pictures, and a few old pictures are in
the group. You can just set the "Skip" button and DMJ GIF
won't spend any more time converting them.
Once you're happy with all of the options for each picture,
just choose the "Begin" option, and DMJ GIF will go about its
business converting the pictures. You can go watch a movie,
get some sleep, or have a bite to eat.
If you stop a conversion and choose "Abort" from the alert
box, DMJ GIF will ask you if you want to abort the entire
batch. Just choose "Yes" or "No"; "Yes" will stop the entire
conversion process and return you to the main dialog, and
"No" will proceed with the next picture. (DMJ GIF will not
Page 13
ask you if it is already on the last picture, since that
would be pointless.)
A note on the "Add" button: It is possible to add a file that
is already in the batch list. That way you can convert the
same picture two different ways. Future versions may check
for this and at least give a warning...
ST Resolution GIFs
Sometimes you will find a GIF that precisely fits an ST
resolution. On such an occasion, DMJ GIF may suggest that you
convert it to an ST resolution image, instead of a Spectrum
picture. (Some images, although they fit an ST resolution,
may have many similar colors in them, which would require
dithering to bring those colors out. In these cases DMJ GIF
will suggest you convert to a Spectrum picture.) You can tell
when this happens by looking at the "To" filename after you
select the "Source" GIF. If the extension is .SPC, DMJ GIF
is still suggesting a Spectrum picture. But if it is .TNY,
then DMJ GIF suggests an ST resolution. You can also change
it to .PI1 or .PC1, the former being DEGAS uncompressed, and
the latter being DEGAS Elite Compressed. DMJ GIF defaults
to Tiny format because it usually gives the smallest size
file.
When using Mapping, you may find a situation where DMJ GIF
again suggests saving as an ST resolution picture. Use
similar steps to change the file format.
In some cases, you'll find DMJ GIF suggests an ST resolution
even when there are more colors than will fit in that
resolution. That's because DMJ GIF has analyzed the palette,
and determined that those colors can be accurately
represented by dithering the other colors. This doesn't
happen very often, though.
Conversion Types
In the "Options" section of the main dialog you will find an
inconspicuous button labeled "Type". This seemingly innocent
button hides some very powerful options.
Basically, this button lets you choose what kind of
conversion you want done. There are only three types of
conversion currently available: Full Color, Grey Scale, and
Monochrome. Full color converts the entire picture to a
color image; Grey Scale converts the picture to a grey image;
and Monochrome converts the picture to a monochrome image.
DMJ GIF will automatically select whichever type of
conversion is "best" for the GIF, but you can override it if
you like. Also note that next to each button ("Full Color",
Page 14
"Grey Scale", and "Monochrome") is a list of valid
extensions. DMJ GIF will not allow you to use any extension
for the destination file other than those listed next to the
selected conversion type.
Dithering
"Dithering" is mixing two colors to get a third. In DMJ GIF,
it specifically means the mixing of two very similar colors
to make it look like a more precise shade--one that isn't
possible with the ST's palette of 512 colors.
DMJ GIF has five dithering modes; DMJ GIF will make its best
guess as to which dither mode to use. This guess is based on
which palette you have asked for (the ST's 512 or the STe's
4096), how similar the colors in the original GIF are, and
how much scaling is being done on the picture. To set the
dither mode you want to use, just click on one of the five
dither buttons in the "Options" section of the main dialog.
You want to use as little dithering as possible, since
dithering has the effect of "fuzzing" edges. DMJ GIF will
automatically set whichever dither mode it thinks is best for
the current GIF, so you shouldn't have to set this often.
Also, the more dithering you want to use, the larger the area
of the color you need to be able to see the color detail.
And the biggest reason to use as little dithering as possible
is time. The more dithering, the more time it takes. Level
5 is the exception, because it uses a different technique
than levels 1-4. Level 5 is about as fast as Level 3. But
you should never use level 5 on a color conversion; it just
doesn't produce very good pictures. You should only use
level 5 for grey-scale conversions.
If you change either the palette or the scaling factors,
click on the word "Dither" and DMJ GIF will re-analyze the
information and set the "best" dither mode.
Palettes
DMJ GIF will, if you choose, use the STe's palette of 4,096
colors. This gives you much greater precision in color,
without having to use as much dithering.
There are four palette buttons in the "Options" section. Two
are labeled "Current Palette", and two are labeled "Default
Palette". Each pair has an "ST" button and an "STe" button.
The "Current Palette" buttons affect only the picture
currently selected; they are set to whatever is selected in
the "Default" pair when that picture is first analyzed. If
you change the "Default" pair, DMJ GIF will ask you if you
want to change all the pictures in the batch list. Answering
Page 15
"No" to this question does not cancel your choice of default
palette; it just doesn't change any pictures already
analyzed.
Using the STe's palette does not always bring better results.
In some 256-color pictures, there is already more color than
can be fit on one Spectrum line. By increasing the palette,
you are only increasing the number of colors that should be
on each line. This can make the "streaking" problem worse.
If you get an STe picture with severe "streaking", use the ST
palette.
ST users are probably wondering why they would want to make
an STe picture they can't see. DMJ GIF comes with a program
to let you see the STe pictures on a regular ST. It is able
to simulate 3,375 of the STe's 4,096 colors. DMJ GIF's
"View" feature also performs this emulation. You can display
STe Spectrum pictures with any Spectrum picture viewer, but
you won't see the extra colors unless you're using an STe.
Scaling
As stated in the introduction, many GIF pictures are larger
than the ST's 320x200 low resolution. This means a picture
must be scaled, or reduced, to fit on the Spectrum screen.
Unlike some programs that require the picture to be reduced
the same amount both vertically and horizontally, DMJ GIF
reduces each axis separately. And DMJ GIF does not require
you to use whole numbers, like 1, 2, and 3. You can use
fractional values, like 1.5 or 2.4.
Here's some examples. Let's say you're converting the file
that comes with DMJ GIF, EXAMPLE.GIF. This picture is
640x400. This gives an X (horizontal) reduction factor of 2,
and a Y (vertical) reduction factor of 2. The reduction
values are figured by taking the GIF's size and dividing it
by the Spectrum picture's size. So 640/320=2, which is the X
reduction factor; 400/200=2, which is the Y reduction
factor.
Soon you'll find a Super VGA GIF, which is 640x480. The X
reduction factor in this case is still 2, but the Y reduction
factor is 2.4, because 480/200=2.4. Remember that it's okay
to use fractional values.
I'm sure you've noticed that DMJ GIF automatically calculates
the reduction factors for you. But if you convert an EGA
GIF, which is 640x350, you'll notice that DMJ GIF suggests a
Y reduction factor of 2. What's the deal? 350/200=1.75, not
2. The reason is that EGA pictures of the 640x350 type look
stretched when a Y reduction factor of 1.75 is used. So
after trying several other factors, I settled on 2 as a
reasonable value. DMJ GIF recognizes some other resolutions
Page 16
and also calculates "best guesses" to those pictures.
Most of the time DMJ GIF suggests the best reduction factors
for the GIF. But sometimes you may want to use different
reduction factors (more on why in a bit). To change the
factors, just move the cursor with the arrow keys until it is
after the scaling factor you want to change. You can use ESC
to erase the current number, and then enter a new one.
(BACKSPACE and DELETE also work.) If you leave one of these
factors blank, DMJ GIF will "Guess" the proper scaling
factors.
One reason to change the reduction factors might be if you
were trying to create a special effect. But a more common
reason is that the picture looks squashed, and you want to
try to correct that. As stated above, a Super VGA GIF has
reduction factors of 2 and 2.4. Occasionally a picture will
appear squashed, because the aspect ratio is different. (The
aspect ratio is the ratio between a pixel's width and its
height.) If you convert a Super VGA GIF, and it appears
squashed, try reduction factors of 3 and 3. This will
maintain the aspect ratio, while still getting a fairly large
picture.
Now you're probably wondering why I didn't suggest just using
2.4 and 2.4. The reason is that when you use fractional
factors, the number of colors increases dramatically, because
you end up with a lot of fractional colors at the edges of
solid areas. For Y factors, it's no problem, since one
Spectrum line has no affect on any other. But you should try
(if possible) to keep the X factors as whole numbers, since
Spectrum only permits 42 colors per line, and all those
fractional colors wouldn't come out properly...
Here's where the "Guess" and "Exact" buttons are used. If
you've changed the scaling factors and want to reset them,
the "Guess" button can be used to have DMJ GIF provide its
best guess at the scaling factors (the same guess as first
provided). The "Exact" button provides the exact scaling
factors; it bypasses the "best guess" part (so EGA 640x350
GIFs are scaled 2x1.75).
Mapping
This is one of the most sophisticated options in DMJ GIF.
What it does is allow you to choose exactly what part of the
GIF you want to convert to Spectrum format.
To use Mapping, you must have first converted the picture
normally. Since you wouldn't know you didn't want the whole
image unless you'd already converted the picture, this
shouldn't be a problem. Select the original GIF as the
"From" file; then click on the "Map" button in the lower left
Page 17
hand corner of the main dialog. You will be prompted to
select the "Map" picture. This is the entire picture as it
was originally converted. Here's an example: if you
converted EXAMPLE.GIF and got EXAMPLE.SPC, then when you want
to selectively convert the same picture, EXAMPLE.GIF would be
the "Source", and EXAMPLE.SPC would be the "Map". It is
extremely important that you used the reduction factors
suggested by DMJ GIF in this "Map" picture, or you won't get
the part you expected to get!
Once you've selected the Map picture, you'll see it appear on
the screen. (If you selected a Spectrum picture as the Map,
DMJ GIF will first convert it to a grey scale image. This
takes about ninety seconds.) Now you'll see some crosshairs
on the screen. What you must do now is select the portion of
the picture you want to convert. Move the crosshairs with
the mouse to one corner of the part you want, and click the
left mouse button. Then move the crosshairs to the opposite
corner and press the left mouse button. The portion of the
picture that is enclosed in the rectangle between the
crosshairs is what will appear in the final picture. If you
press the right mouse button after selecting one corner
point, that corner point will disappear, allowing you to
choose it again. If you press the right mouse button with no
corner points selected, you will abort the Mapping
procedure.
After selecting the portion of the GIF you want to convert,
you will be presented with a dialog containing two options.
The first is "Same Aspect". If this is set, DMJ GIF will
convert the portion you requested, but will keep the same
proportions as the map picture. If this is not set, DMJ GIF
will convert the portion you requested, scaling it to
precisely fill the entire screen. This is useful for
creating squashed or squeezed pictures, or when the original
image was a bit squashed or squeezed and you want to fix it.
The second option, "Trim Edges", applies only if "Same
Aspect" is set. If you keep the proportions the same, there
will be areas around the converted picture that are not in
the selected portion of the image. If you select "Trim
Edges", these areas will appear black. If this option is not
set, these areas will contain more of the original image.
(This may mean shifting the selected portion of the picture
off-center to prevent going over the edge of the GIF.)
Select "Okay" when you're done setting these options.
Once Mapping is set, you can change it by clicking on the
"Map" button again. You will be asked if you want to change
the selected portion or if you want to disable Mapping.
(Note: if you converted a picture or selected another Map
picture, you will have to reload the Map picture.)
If you have selected Mapping, you should NOT change the
scaling factors yourself! If you do, you won't get the
Page 18
picture you think you're getting. Use the "Exact" and
"Guess" buttons to reset the scaling factors.
Interlaced GIFs
Occasionally you will find a GIF that is interlaced--that is,
the picture isn't stored so that lines next to each other on
the screen are next to each other in the file. This is
inconvenient for DMJ GIF, since it needs to process the lines
from top to bottom. So what DMJ GIF does is Uncompress the
entire picture and then Scale it. Some pictures are too big
to fit in memory. If this happens, DMJ GIF will write the
picture, uncompressed, to the disk. This takes longer, but
it's better than not being able to convert the picture at
all. (This also consumes an enormous amount of disk space;
let's hope that nobody creates an interlaced GIF that
uncompresses to 2 Meg!)
Keyboard Shortcuts
DMJ GIF does have some keyboard shortcuts to buttons in the
main dialog. Here they are:
Help "Help"
I "Info"
Undo "Quit"
F "From"
T "To"
Return "Begin"
A "Add"
R "Remove"
S "Save"
V "View"
D "Dither"
F1-F5 Dither "1"-"5"
F7 Current Palette "ST"
F8 Current Palette "STe"
F9 Default Palette "ST"
F10 Default Palette "STe"
P "Map"
G "Guess"
E "Exact"
Y "Type"
K "Skip"
? "Prefs"
M "More"
All of these are in lower case.
There are also some other keypresses that can be used
elsewhere:
Page 19
o In any "Yes"/"No" alert box, Return is "Yes" and Undo is
"No".
o In the "Abort Conversion" alert box, Return is "Abort", P
is "Peek", and Undo is "Cancel".
o In the fileselector, Return is "Okay", Undo is "Cancel",
and Tab brings up the search mask dialog.
o In any disk error dialog, Return is "Retry" and Undo is
"Cancel".
o In any situation where you have "Abort" or "Cancel", Return
is "Abort" and Undo is "Cancel".
Preferences
This button allows you to set some of the defaults used by
DMJ GIF. There are four things that you can set in this
dialog: what to do about existing destination files, the
default palette when loading, whether to use the ST or STe
palette inside the program, and which drive to use for the
temporary file.
"Existing Files" allows you to set what you'd like to do
about files that already exist when DMJ GIF tries to save a
picture (i.e. you want to save BEARS.SPC, and there's already
a BEARS.SPC on the disk). "Erase" will simply overwrite the
old file, destroying it. "Rename" will rename it with the
extension ".BAK", destroying any existing backup, but
preserving the existing file. "Ask", the default, will have
DMJ GIF ask you which option to choose every time the
situation occurs. If you plan to leave DMJ GIF to work
unattended, you should select "Erase" or "Rename"; otherwise,
DMJ GIF will stop its work to ask you what to do about an
existing file, and you won't be around...
"Default Palette" refers to the "Default Palette" buttons in
the main dialog. The default is "Check", which means DMJ GIF
will check whichever system it is running on and use the
palette for that system. You can override this feature by
selecting "ST" or "STe"; this option is only acted upon when
the program first loads up. (Owners of 4096 color boards for
the ST can use this to set the STe palette to always be the
default.)
"In-program Palette" refers to which palette the program uses
to display pictures. Again, the default is "Check". If DMJ
GIF uses the ST palette, it will flicker STe color images to
simulate the STe colors. Also, when converting Spectrum
pictures to grey Map pictures, it will only use eight shades
of grey. If DMJ GIF uses the STe palette, however, it will
not flicker STe color images, and will use sixteen shades of
grey for Map pictures.
Page 20
"Temp Drive" allows you to choose the drive DMJ GIF will
write temporary files to. This is only important for
interlaced pictures that are too large to uncompress to RAM;
DMJ GIF then writes the uncompressed picture to disk. To
select the drive for this temporary file, just click on the
drive letter. The default is "Run", which refers to the
drive DMJ GIF was run from. If the specified drive does not
exist, DMJ GIF will revert to the "Run" drive.
Once you've set your Preferences, you can click on "Save" to
save these preferences to DMJ_GIF3.PRF. If you save your
preferences, you also save the positions of the movable
dialogs (the fileselector, search mask dialog, etc.) and all
of the search masks in the search mask dialog. You can click
on "Use" to keep the preferences without saving them.
"Cancel" aborts your choices.
Bugs
Wrong? How could anything possibly go wrong? Not with MY
program, surely!
Well, okay, perhaps just a little tiny thing went wrong.
It's probably nothing major. DMJ GIF will, for the most
part, tell you precisely what it is having a problem with.
But if for some reason you get a dialog that tells you
something like "Error xxx" then that's a bug. And when you
find one, it's pretty important that you write down as much
information about what you're doing, which GIF you're using,
and any other programs and accessories you might have loaded
at the time. Then let me know! I can't fix a bug if nobody
tells me about it. I've tested DMJ GIF as best I could, on
both 1 Meg and 512K machines, with a variety of AUTO folder
programs, etc. but it's always possible that something can go
wrong.
There are some things that you can solve yourself. One very
common glitch is that you'll see little specks (usually
black) in your Spectrum pictures, and they'll usually form a
sort of vertical line. This isn't my fault! What's
happening is that the Spectrum display routines aren't
properly synchronized. Usually all you have to do is reset
the computer. I'd suggest actually pressing the reset button
or turning the computer off; using another program to reset
the computer usually doesn't cure the problem. If you still
see the spots, try changing the order of the programs in your
AUTO folder--one of them may be the culprit. If you have an
STe, try switching to low resolution. Spectrum pictures from
other programs are also susceptible to this little annoyance,
but the pictures generated by DMJ GIF are much more
susceptible because DMJ GIF squeezes every bit of color it
can out of Spectrum mode. Fortunately this sync problem
Page 21
doesn't occur too often on most machines.
If you should chance to fill up the disk while trying to save
a picture, DMJ GIF will tell you the disk is full, and ask
that you insert a fresh disk. At this point, you should
either insert a new disk and select "Retry" or decide to
forget the whole thing and select "Cancel". If you select
"Retry", DMJ GIF will save the picture in the root directory
of the disk (NOT the folder specified in the "To" filename).
I'd suggest at this point that you abort further conversions,
remove all files from the batch list that have been
converted, and either relocate the pictures to the root
directory or save the batch list, exit the program, create
the necessary folders, and reload the program and batch list
and begin again. Future versions of DMJ GIF may be a bit
nicer in this respect...
Users of the Mega STe will obviously not be able to see
Spectrum pictures while running at 16 MHz; however, once the
computer is slowed down to 8 MHz the pictures display
properly. It's best to leave the computer in 16 MHz mode
while converting pictures, though, because conversion is a
time-consuming process. I am told that using DMJ GIF 2.0, a
GIF converts in about 2/5 the time as on a regular ST. I
have no information on version 3.0 yet.
Feedback
It's extremely important that you, as a user, tell me what
you want in the program! Granted, I can come up with some
very clever ideas, but the best ideas come from people who
know absolutely nothing about what can and can't be feasibly
done, which gets programmers thinking about how it can be
done. (The above is said with a smile.) Seriously, though,
user feedback is critical to the improvement of any program;
after all, the users are the ones who use the program. So if
you have a comment, a suggestion, or if there something you
don't like about the program, then PLEASE let me know! As an
example of how important feedback is, let me say that letters
from one of my (very enthusiastic) registered users hastened
the design of the new interface by posing some very important
questions. Had that person not asked the questions he did
(about Mapping and STe palette) I might not have noticed
several flaws in my design until it was too late.
The Companion Utilities
In addition to DMJ GIF, there are four companion utilities
that perform a variety of useful functions. Here's a list of
what they are and how to use them:
SPC2PI1
Page 22
This simple program converts Spectrum pictures to DEGAS low
res (.PI1) format. It's useful when you get a Spectrum
picture that has 16 or fewer colors, or when you need a low
res approximation of a Spectrum picture.
To use this program, just select the source and destination
file. The source may be in compressed (.SPC) or uncompressed
(.SPU) format. The destination filename should end in .PI1,
of course. You'll find that the program keeps track of two
separate paths--one for the source pictures, and one for the
destination pictures. You'll be warned if the source and
destination files are the same, or if you try to overwrite an
existing file.
After selecting both the source and the destination file, the
picture will load and display on the screen. Press any key
to continue with the conversion, or ESC to abort. You can
press ESC at ANY time to abort the conversion. The first
phase of the conversion takes approximately 75 seconds, and
is just a color count. When that is finished, the program
will tell you how many colors were in the original picture,
and the percentage of the picture that is covered by the 16
colors chosen. The higher the percentage, the more the DEGAS
picture will look like the Spectrum picture. Once the
picture is converted, it will be saved, and you will be asked
if you want to delete the source picture.
This program does recognize and use the STe palette,
regardless of which computer you are actually using. If you
are converting an STe Spectrum picture and plan to view it on
an ST, be aware that you may get two colors that appear the
same on an ST, but are actually different. In this case just
load the picture into your favorite paint program and tinker
with the palette until it's how you like it.
After converting one picture, you can select another picture
to convert, or select "Cancel" from the first file selector
to exit the program.
SPC2PI3
This program and SPU2SPC are the only two companion utilities
that will run on a monochrome monitor. This program is like
SPC2PI1, except that it converts a Spectrum picture to a
DEGAS high-resolution format. This is one way to get a
black-and-white version of a Spectrum picture.
You use this program just like SPC2PI1, except the extension
for the destination file should be .PI3. Once the picture is
loaded, it will be displayed, unless you are using a
monochrome monitor (obviously). Press a key to continue with
the conversion.
Page 23
If you have the original GIF that created the Spectrum
picture, it's probably a better idea to use DMJ GIF to
re-convert the original GIF, either to a 16-color image in
color or a monochrome image. These programs were included to
convert Spectrum pictures when you didn't have the original
GIF, and do not do quite as good a job as DMJ GIF does.
SPU2SPC
This program does nothing but load and save the picture. It
does not change the picture in any way. The idea behind the
program is to provide you an easy way of converting
uncompressed (.SPU) Spectrum pictures to compressed (.SPC)
format, and vice versa. You use this program in the same way
as SPC2PI1, except that the picture will not be displayed,
and the destination file should end in either .SPC or .SPU.
Sometimes you might find a Spectrum (.SPC) picture that is
50014 bytes long. These pictures are not compressed fully;
you should use SPU2SPC to re-save them in .SPC format.
SPC-3375
This is a slideshower/picture viewer that lets you see 3,375
of the STe's 4,096 colors on a regular ST. Just run the
program, and either select a single picture (which will then
be displayed) or a wildcard (like *.*) to begin a slideshow.
While running a slideshow, you can use the function keys to
set the speed, press the spacebar to freeze the picture, or
any other key to advance to the next picture, except the ESC
and UNDO keys, which abort the show. Select "Cancel" from
the file selector to exit the program.
SPC-3375 emulates the STe's colors by "flickering" the colors
between a lighter shade and a darker shade. The eye is
fooled into seeing a shade that is halfway between the two
shades. Since the flickering isn't quite as fast as the
monitor (it's only half as fast) you will see some visible
flickering. This is reduced by using lighter and darker
shades every other line, then swapping them to do the
flicker. Don't stare too closely at the screen, though,
because then the flicker effect is wasted.
Those of you who don't have a monitor--well, the flickering
is extremely bad on a television. Enough so that I wondered
at a user who told me he always used the STe palette, even
though he has only an ST. Then I got my monitor, and I knew
why! The flickering is only half as bad on a monitor as it
is on a TV.
Thanks...
A program this complex cannot be done without the help of
Page 24
others. Thanks to all these people for their help in getting
this program going.
Robert and Eric Swenson, of Novato, CA, for introducing me to
the ST and convincing me not to buy an Amiga.
Robert Glover, of Stuart, FL, for finally getting me the
Spectrum display routine, and for all of his dedicated
testing.
Marc Lombardo, of Ralston, NE, for being there when I felt
like talking my head (and his ear) off with awesome program
ideas.
Bryan Woodworth, of San Jose, CA, for making all those
excellent suggestions--most of which are in version 3.0--and
for asking pointed questions about the new version.
Tom Hayslett, of Vogelweh, Germany, for sage advice, a ride
up to Düsseldorf, and a fantastic manual.
All of my registered users--that check in the mail makes it
all worth it.